package com.cloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @YIKOUJING
 * @author LXY
 * @Description 配置中心测试
 * @createDate 2022/4/17
 * @createTime 14:11
 */
@Slf4j
@RestController
@RefreshScope
@RequestMapping(value = "/config")
public class ConfigTestController {

    @Value("${config.info}")
    private String info;

    @GetMapping(value = "/getInfo")
    public String getInfo(){
        return info;
    }

}
